<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1">
<!-- Google Chrome Frame也可以让IE用上Chrome的引擎: -->
<meta name="renderer" content="webkit">
<!--国产浏览器高速模式-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="穷在闹市" />
<!-- 作者 -->
<meta name="revised" content="穷在闹市.v3, 2019/05/01" />
<!-- 定义页面的最新版本 -->
<meta name="description" content="网站简介" />
<!-- 网站简介 -->
<meta name="keywords" content="搜索关键字，以半角英文逗号隔开" />
<title>明联人才后台</title>

<!-- 公共样式 开始 -->
<link rel="stylesheet" type="text/css" href="back_cssAndjs/css/base.css">
<link rel="stylesheet" type="text/css"
	href="back_cssAndjs/css/iconfont.css">
<script type="text/javascript"
	src="back_cssAndjs/framework/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" type="text/css"
	href="back_cssAndjs/layui/css/layui.css">
<script type="text/javascript" src="back_cssAndjs/layui/layui.js"></script>
<!-- 滚动条插件 -->
<link rel="stylesheet" type="text/css"
	href="back_cssAndjs/css/jquery.mCustomScrollbar.css">
<script src="back_cssAndjs/framework/jquery-ui-1.10.4.min.js"></script>
<script src="back_cssAndjs/framework/jquery.mousewheel.min.js"></script>
<script src="back_cssAndjs/framework/jquery.mCustomScrollbar.min.js"></script>
<script src="back_cssAndjs/framework/cframe.js"></script>
<!-- 仅供所有子页面使用 -->
<!-- 公共样式 结束 -->

</head>
<body>

<body>
	<div class="demoTable">
		搜索姓名：
		<div class="layui-inline">
			<input class="layui-input" id="strLike" name="strLike"
				autocomplete="off">
		</div>
		<button class="layui-btn" data-type="reload" type="button">搜索jop</button>
	</div>

	<table class="layui-hide" id="LAY_table_user" lay-filter="demo">

	</table>

<script type="text/html" id="barDemo">
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
	<script>
		layui.use('table', function() {
			var table = layui.table;

			//方法级渲染
			table.render({
				elem : '#LAY_table_user',
				url : 'jop_list',

				cols : [ [ {
					checkbox : true,
					fixed : true
				}, {
					field: 'jobId',
					title: 'ID',
					width: 80,
					sort: true,
					fixed: true
				}, {
					field: 'comId',
					title: '企业ID',
					width: 100
				}, {
					field: 'jobName',
					title: '职位名称',
					width: 100,
					sort: true
				}, {
					field: 'jobCategory',
					title: '职位类别',
					width: 100
				}, {
					field: 'jobAddress',
					title: '工作地点'
				}, {
					field: 'jobNature',
					title: '工作性质',
					sort: true,
					width: 100
				}, {
					field: 'jobStartTime',
					title: '发布时间',
					sort: true,
					width: 100
				}, {
					field: 'jobEndTime',
					title: '截止时间',
					width: 100
				}, {
					field: 'jobSalary',
					title: '薪资范围',
					sort: true,
					width: 135
				} ,{
					title : '操作',
					toolbar: '#barDemo',
					width: 100
				}] ],
				id : 'testReload',
				page : true,
				height : 310
			});

			
			
			 //监听工具条
			  table.on('tool(demo)', function(obj){
			    var data = obj.data;
			    if(obj.event === 'del'){
			        layer.confirm('真的删除行么', function(index){
			      	  
			      	  // ajax请求
			      	  $.post("delJob","jobId=" + data.jobId, function(data) {
			      		  // 处理返回的删除结果
			      		 layer.msg(data == "true"?"删除成功!":"删除失败!", {icon: 1});
			      		 obj.del();// 假删除操作(仅前端删除)
			            	 layer.close(index);// 关闭提示框
			      	  });
			        });
			      } 
			  });
			 
			var $ = layui.$, active = {
				reload : function() {
					var demoReload = $('#strLike');
					//执行重载
					table.reload('testReload', {
						page : {
							curr : 1
						//重新从第 1 页开始
						},
						where : {
							"strLike" : demoReload.val()
						}
					}, 'data');
				}
			};

			$('.demoTable .layui-btn').on('click', function() {
				var type = $(this).data('type');
				active[type] ? active[type].call(this) : '';
			});
		});
	</script>
	
	<!-- 弹出层里显示的内容(更新操作) -->
				<div id="div1" style="display: none; text-align: left;">
					<form class="layui-form" action="" lay-filter="example">
							<div class="layui-form-item">
							<label class="layui-form-label newbie-width-one">ID</label>
							<div class="layui-input-block">
								<input type="text" name="uId" id="uId" lay-verify="title"
									autocomplete="off" readonly placeholder="ID"
									class="layui-input newbie-width-two">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label newbie-width-one">用户名</label>
							<div class="layui-input-block">
								<input type="text" name="uName" id="uName" lay-verify="title"
									autocomplete="off" placeholder="请输入用户名"
									class="layui-input newbie-width-two">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label newbie-width-one">用户密码</label>
							<div class="layui-input-block">
								<input type="password" name="uPwd" id="uPwd"
									lay-verify="title" autocomplete="off" placeholder="请输入用户密码"
									class="layui-input newbie-width-two">
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label newbie-width-one">手机号码</label>
							<div class="layui-input-block">
								<input type="text" name="uPhone" id="uPhone"
									lay-verify="title" autocomplete="off" placeholder="请输入手机号码"
									class="layui-input newbie-width-two">
							</div>
						</div>
						
						<div class="layui-form-item">
							<label class="layui-form-label newbie-width-one">性别</label>
							<div class="layui-input-block">
								<input type="radio" name="uSex" value="男" title="男" checked="">
								<input type="radio" name="uSex" value="女" title="女">
							</div>
						</div>
						
						<div class="layui-form-item">
							<label class="layui-form-label newbie-width-one">头像</label>
							<div class="layui-input-block">
								<input type="text" name="uImg" id="uImg"
									lay-verify="title" autocomplete="off" placeholder="请输入地址"
									class="layui-input newbie-width-two">
							</div>
						</div>
						
						<div class="layui-form-item">
							<label class="layui-form-label newbie-width-one">用户等级</label>
							<div class="layui-input-block newbie-width-two">
								<select name="uLevel" id="uLevel" lay-filter="aihao">
									<option value=""></option>
									 <option value="0">管理员</option>
									<option value="1">普通用户</option>
								</select>
							</div>
						</div>
						<div class="layui-form-item">
							<label class="layui-form-label newbie-width-one">用户状态</label>
							<div class="layui-input-block newbie-width-two">
								<select name="uState" id="uState" lay-filter="aihao">
									<option value=""></option>
									<option value="0">启用</option>
									<option value="1">禁用</option>
								</select>
							</div>
						</div>
						<div class="layui-form-item">
							<div class="layui-input-block">
								<button type="submit" class="layui-btn" lay-submit=""
									lay-filter="demo1">立即提交</button>
							</div>
						</div>
					</form>
				</div>
	
	

</body>

</html>